package com.duleme.entity;

import com.duleme.common.JsonUtils;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;

public class BookJson<T> {
    private List<T> data;
    private int code=0;
    private String msg="";
    private int count;

    public List<T> getData() {
        return data;
    }

    public void setData(List<T> data) {
        this.data = data;
    }

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    public int getCount() {
        return count;
    }

    public void setCount(int count) {
        this.count = count;
    }

    public static void main(String [] args){
        BookJson bookJson=new BookJson();
        bookJson.setCode(0);
        bookJson.setCount(1);
        bookJson.setMsg("str");
        Book book=new Book();
        book.setBookName("wxy");
        List<Book>books=new ArrayList<>();
        books.add(book);
        bookJson.setData(books);
        System.out.println(JsonUtils.toJson(bookJson));
    }
}
